package com.itjin.contant;

/**
 * 活动相关常量
 */
public class ActivityConstant {

    /**
     * 活动类型
     */
    public enum ActivityType {
        ACADEMIC_LECTURE(0, "学术讲座"),
        ENTERTAINMENT(1, "文娱活动"),
        SPORTS(2, "体育活动"),
        CLUB(3, "社团活动"),
        VOLUNTEER(4, "志愿服务"),
        OTHER(5, "其他");

        private final Integer code;
        private final String desc;

        ActivityType(Integer code, String desc) {
            this.code = code;
            this.desc = desc;
        }

        public Integer getCode() {
            return code;
        }

        public String getDesc() {
            return desc;
        }

        public static String getDescByCode(Integer code) {
            if (code == null) return "未知";
            for (ActivityType type : values()) {
                if (type.code.equals(code)) {
                    return type.desc;
                }
            }
            return "未知";
        }
    }

    /**
     * 活动状态
     */
    public enum ActivityStatus {
        REGISTRATION(0, "报名中"),
        IN_PROGRESS(1, "进行中"),
        FINISHED(2, "已结束"),
        CANCELLED(3, "已取消");

        private final Integer code;
        private final String desc;

        ActivityStatus(Integer code, String desc) {
            this.code = code;
            this.desc = desc;
        }

        public Integer getCode() {
            return code;
        }

        public String getDesc() {
            return desc;
        }

        public static String getDescByCode(Integer code) {
            if (code == null) return "未知";
            for (ActivityStatus status : values()) {
                if (status.code.equals(code)) {
                    return status.desc;
                }
            }
            return "未知";
        }
    }

    /**
     * 默认值
     */
    public static final Integer DEFAULT_ACTIVITY_TYPE = ActivityType.OTHER.getCode();
    public static final Integer DEFAULT_ACTIVITY_STATUS = ActivityStatus.REGISTRATION.getCode();
    public static final Integer DEFAULT_MAX_PARTICIPANTS = 0; // 0表示无限制
} 